package com.example.intelligenttransportationteam1;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;

public class UiInstrument extends LinearLayout {
    LinearLayout layout;
    TextView tvTitle,tvValue;//文本控件

    public UiInstrument(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        LayoutInflater.from(context).inflate(R.layout.instrumentlayout,this,true);

    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        layout=findViewById(R.id.layout);
        tvTitle=findViewById(R.id.tv_main_title);
        tvValue=findViewById(R.id.tv_main_value);
        tvTitle.setText("项目");
        tvValue.setText(0);

    }


}
